package wiki.xsx.core.config;

import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.RedisTemplate;
import wiki.xsx.core.util.ApplicationContextUtil;

/**
 * redis自动配置
 * @author xsx
 * @date 2019/4/18
 * @since 1.8
 */
@Configuration
@ConditionalOnClass(RedisTemplate.class)
class RedisAutoConfiguration {

    /**
     * 上下文工具
     * @return 返回上下文工具
     */
    @Bean
    public ApplicationContextUtil applicationContextUtil() {
        return new ApplicationContextUtil();
    }
}
